CapitalController = BaseController.extend({
	template:'Capital',
	center:'余额明细',

	waitOn:function(){
		let self = this;
		self.partnerInfo = this.currentUser();
		Tracker.autorun(function(){
			return Meteor.subscribe('capitals',{partner_id: parseInt(self.partnerInfo.id)},{},function(){
				return self.ready();
			});
		});
    },
    onRendered:function(){

	},
	data: function(){
		return {
			capitalList:function(){
				var rt = [];
				capitalInfo = Capitals.find().fetch();
				for (var i = capitalInfo.length-1; i >= 0; i--){
					rt.push(capitalInfo[i]);
				}

				return rt;
			},
		};
	},
})
